var UserSQL = {
    login_select_username: function (username) {
        let login_select_username;
        login_select_username = 'select * from user where username=' + username;
        return login_select_username;
    },
    login_insert_token: function (createdOn, tokenType, token, userId, tokenExpire) {
        let login_insert_token;
        login_insert_token = 'insert into user_token(createdOn,tokenType,token,userId,tokenExpire) ' +
            'VALUES(' + createdOn + ',' + tokenType + ',' + token + ',' + userId + ',' + tokenExpire + ')';
        return login_insert_token;
    },
    //作品
    blog_production_query_all_try: function (value) {
        let blog_production_query_all_try;
        blog_production_query_all_try = 'select * from blog_article where id=' + value;
        return blog_production_query_all_try;
    },
    token_select_check: function (token) {
        let token_select_check;
        token_select_check = 'select * from user_token where token=' + token;
        return token_select_check;
    },
    blog_article_query_all: 'select * from blog_article',
    blog_article_query_type: 'select * from blog_article where group=',
    blog_article_insert_blog: 'insert into blog_article(Id,image,time,content,lookvolume,author,group,deleted,status) VALUES(0,?,?,?,?,?,?,?,?)',
    blog_article_update_blog: 'update blog_article set image = ?,content=? where id= ?',//更新数据需要在外面进行数据库语句,先获取到id再更新
    blog_article_delete_blog: 'delete from blog_article where id=?',
    blog_production_query_all: 'select * from blog_article'
};


module.exports = UserSQL;

